<template>
	<view class="reviewitem_styles">
		<image :src="item.icon" mode="" class="reviewitem_styles_image"></image>
		<view class="reviewitem_styles_main">
			<view style="font-size: 16px;">{{item.title}}</view>
			<view style="font-size: 14px; color: #8f9199;" v-if="item.subTitle">推荐测试人群: {{item.subTitle}}</view>
			<view class="reviewitem_styles_desc" v-if="item.desc">{{item.desc}}</view>
			<view class="reviewitem_styles_main_footer">
				<view v-if="isShowTag" style="color: #F15F35; font-size: 14px; line-height: 30rpx;">{{item.tag}}
				</view>
				<view style="color: #8f9199;font-size: 12px; line-height: 30rpx;" v-if="item.date">{{item.date}}</view>
				<view style="color: #8f9199;font-size: 12px; line-height: 30rpx;" v-if="item.count">{{item.count}}人阅读</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "ReviewItem",
		data() {
			return {

			};
		},
		props: ["item", "isShowTag"]
	}
</script>

<style>
	.reviewitem_styles {
		width: 100%;
		height: 280rpx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
		padding: 30rpx;
		margin-bottom: 30rpx;
	}

	.reviewitem_styles_image {
		width: 30%;
		height: 100%;
	}

	.reviewitem_styles_main {
		width: 70%;
		position: relative;
		margin-left: 20rpx;
	}

	.reviewitem_styles_main_footer {
		margin-top: 20rpx;
		width: 100%;
		position: absolute;
		bottom: 0;
		display: flex;
		justify-content: space-between;
	}
	
	.reviewitem_styles_desc {
		font-size: 14px; 
		color: #8f9199;
		white-space: pre-wrap;
		display: -webkit-box;
		-webkit-line-clamp: 2; //此处为上限行数
		-webkit-box-orient: vertical;
		overflow: hidden;
		text-overflow: ellipsis;
	}
</style>
